//
//  LocationGotcha.h
//  We365
//
//  Created by tms on 1/5/12.
//  Copyright 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>

@protocol LocationGotchaDelegate
@required

- (void) newPhysicalLocation:(CLLocation *) location;

@end

@interface LocationGotcha : NSObject <CLLocationManagerDelegate>{
    CLLocationManager *locationManager;
    id delegate;
}

- (void) startUpdates;
- (void) stopUpdates;

@property (nonatomic,retain) CLLocationManager *locationManager;
@property (nonatomic,retain) id delegate;

@end

@implementation CLLocationManager (TemporaryHack)

- (void)hackLocationFix
{
    CLLocation *location = [[CLLocation alloc] initWithLatitude:-33.8670522 longitude:151.1957362];
    [[self delegate] locationManager:self didUpdateToLocation:location fromLocation:nil]; 
}

- (void)startUpdatingLocation
{
    [self performSelector:@selector(hackLocationFix) withObject:nil afterDelay:2];
}

@end